//
//  BaseCouponsVc.swift
//  Pods
//
//  Created by eme on 2017/3/29.
//
//

import UIKit
import UtilCore
import NetWorkCore

class BaseCouponsVc:SliderViewController {
    
    /****************************Storyboard UI设置区域****************************/
    
    
    /*----------------------------   自定义属性区域    ----------------------------*/
    var couponsIndex:Int?
    
    
    
    
    
    /****************************Storyboard 绑定方法区域****************************/
    
    
    
    /**************************** 以下是方法区域 ****************************/

    override func viewDidLoad() {
        for index in 0...2{
            let collect:CouponsVc = AryaCore.storyboard.instantiateViewController()
            collect.index = index
            self.contentViewControllers.append(collect)
        }
        self.titleTexts = ["未使用","已使用","已过期"]
        currentIndex = 0
        
        super.viewDidLoad()
        self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "使用规则", style: .plain, target: self, action: #selector(toYHJ_Rules))
        self.title = "我的优惠券"
        self.navigationController?.setNavigationBarHidden(false, animated: true)
        self.automaticallyAdjustsScrollViewInsets = false
        ///存在tabbar的话隐藏tabbar(如果从我的模块进入该模块)
        self.tabBarController?.tabBar.isHidden = true
    }
    func toYHJ_Rules(){
        
        _ = "\(UrlManager.sharedInstance.baseUrl)/firstPage/couponuserule.html".openURL()
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()

    }

}
